#ifndef HTTP_H
#define HTTP_H

#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_log.h"
#include "nvs_flash.h"

#include "lwip/err.h"
#include "lwip/sockets.h"
#include "lwip/sys.h"
#include "lwip/netdb.h"
#include "lwip/dns.h"
#include "sdkconfig.h"

#define REQ_SERVER "universities.hipolabs.com"
#define REQ_PORT "80"
#define REQ_PATH "http://universities.hipolabs.com/"

extern char *STA_REQUEST;

typedef struct {
  char* server;
  char* port;
  char* request;
  char* buffer;
  size_t len;
} http_params;

int http_request(http_params params);

#endif
